<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:replace="admin/_fragments :: head(~{::title})">
    <meta charset="UTF-8">
    <title>分类管理</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
    <link rel="stylesheet" href="../../static/css/mine.css">
</head>
<body>

<!--导航-->
<nav th:replace="admin/_fragments :: menu(3)" class="ui inverted attached segment m-padded-tb-mini m-shadow-small">
    <div class="ui container">
        <div class="ui inverted secondary stackable menu">
            <h2 class="ui teal header item">Volcreate</h2>
            <!--icon的地址-->
            <a href="index.html" class="m-item item m-mobile-hide"><i class="home icon"></i>管理首页</a>
            <a href="blogs.html" class="m-item item m-mobile-hide"><i class="blogger icon"></i>博客管理</a>
            <a href="category.html" class="m-item item m-mobile-hide"><i class="idea icon"></i>分类管理</a>
            <a href="index.html" class="m-item item m-mobile-hide"><i class="bars icon"></i>更多</a>
            <!--登录管理-->
            <div class="right m-item m-mobile-hide menu">
                <div class="ui dropdown item">
                    <div class="text"><img class="ui avatar image" src="../../static/images/c1.jpeg" alt="">zxc</div>
                    <i class="dropdown icon"></i>
                    <div class="menu"><a href="#" class="item">注销</a></div>
                </div>
            </div>
        </div>
    </div>
    <!--手机端适配-->
    <a href="#" class="ui menu toggle black icon button m-right-top m-mobile-show">
        <i class="sidebar icon"></i>
    </a>
</nav>


<!--分类管理-->
<div th:replace="admin/_fragments :: cat_menu(3)"   class="ui attached pointing menu" >
    <div class="ui container">
        <div class="left menu">
            <a href="#"  class="item">分类管理</a>
        </div>
        <div class="right menu m-padded-lr-responsive">
            <a href="#"  class="item">类别</a>
            <a href="#"  class="active item">标签</a>
            <button type="button" class="ui button" onclick="window.history.go(-1)">返回</button>
        </div>
    </div>
</div>







<!--中间内容-->
<div class="m-container m-padded-tb-big">
    <div class="ui container">
        <form action="#" method="post" th:object="${tag}" th:action="@{/admin/tag}" class="ui form">
            <!--种类-->
            <input type="hidden" name="id", th:value="*{id}">
            <div class="required field">
                <div class="ui left labeled input">
                    <label class="ui green basic label">名称</label>
                    <input type="text" name="name" placeholder="输入标签名" th:value="*{name}">
                </div>
            </div>
            <div class="ui error message"></div>
            <!--/*/
                <div class="ui negative message" th:if="${#fields.hasErrors('name')}"  >
                  <i class="close icon"></i>
                  <div class="header">验证失败</div>
                  <p th:errors="*{name}">提交信息不符合规则</p>
                </div>
             /*/-->
            <div class="ui right aligned container">
                <button class="ui green submit button">提交</button>
            </div>
        </form>

    </div>
</div>





<!----------------JS---------------->
<!--/*/<th:block th:replace="admin/_fragments :: script" >/*/-->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
<script src="../../static/js/mine.js"></script>
<!--/*/</th:block>/*/-->
<script>

    $(".tabular.menu .item").tab();

    $('.ui.dropdown').dropdown({
        on: 'hover'
    });
    $('.ui.form').form({
        fields: {
            name: {
                identifier: 'name',
                rules: [{
                    type: 'empty',
                    prompt: '请勿提交空表单'
                }]
            }
        }
    });
    //消息提示关闭初始化
    $('.message .close')
        .on('click', function () {
            $(this)
                .closest('.message')
                .transition('fade');
        });
</script>
<!----------------JS---------------->
</body>
</html>